package GenericComplex;

public class Vehicle implements Comparable<Vehicle> {
    public int speed;
   public String color;
    public int getSpeed(){
        return speed;
    }
    public void setSpeed(int speed){
        this.speed=speed;
    }
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color=color;
    }
    public int compareTo(Vehicle v){
        return this.speed-v.speed;
    }
    public Vehicle(int speed,String color){
        this.speed=speed;
        this.color=color;
    }

}
